<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <base href="${request.contextPath}/"/>
    <meta charset="UTF-8">
    <meta name="Keywords" content="">
    <meta name="Description" content="">
    <meta name="format-detection" content="telephone=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,minimum-scale=1.0">
    <title>漠河智慧社区</title>
    <link href="Content/wechat/css/reset.css" rel="stylesheet" type="text/css">
    <!--签到-->
    <link href="Content/wechat/css/qianDaoBang.css" rel="stylesheet" type="text/css">
<!--    <link href="Content/wechat/css/zhiYuanZhe_hd.css" rel="stylesheet" type="text/css">-->
    <!--banner-->
    <link href="Content/wechat/css/amazeui.min.css" rel="stylesheet" type="text/css">
    <script src="Content/wechat/js/jquery.min.js"></script>
    <script src="Content/wechat/js/ziti.js"></script>
    <script src="Content/wechat/js/myPagination.js"></script>
    <link href="Content/wechat/css/myPagination.css" rel="stylesheet" type="text/css">
    <!--字体缩放-->
    <script src="Content/wechat/js/ziti.js"></script>
    <!--end 字体缩放-->
</head>
<body>
<!--<header>-->
<!--    <div class="header_bj"></div>-->
<!--</header>-->
<div class="zuoFeng">
 <div class="zuoFeng_box">
<table>
    <tr class="tr_header">
        <td style="width: 20%;font-size: 0.3rem;font-weight: bold">序号</td>
        <td style="width: 40%;font-size: 0.3rem;font-weight: bold">志愿者</td>
        <td style="width: 40%;font-size: 0.3rem;font-weight: bold">志愿币</td>
    </tr>
    <tbody id="insetViewData">
<!--    <tr class="tr_header">-->
<!--        <td>1</td>-->
<!--        <td>天使八倍</td>-->
<!--        <td>5689天</td>-->
<!--    </tr>-->
<!--    <tr class="tr_header">-->
<!--        <td>1</td>-->
<!--        <td>天使八倍</td>-->
<!--        <td>5689天</td>-->
<!--    </tr>-->
<!--    <tr class="tr_header">-->
<!--        <td>1</td>-->
<!--        <td>天使八倍</td>-->
<!--        <td>5689天</td>-->
<!--    </tr>-->
<!--    <tr class="tr_header">-->
<!--        <td>1</td>-->
<!--        <td>天使八倍</td>-->
<!--        <td>5689天</td>-->
<!--    </tr>-->
<!--    <tr class="tr_header">-->
<!--        <td>1</td>-->
<!--        <td>天使八倍</td>-->
<!--        <td>5689天</td>-->
<!--    </tr>-->
<!--    <tr class="tr_header">-->
<!--        <td>1</td>-->
<!--        <td>天使八倍</td>-->
<!--        <td>5689天</td>-->
<!--    </tr>-->
<!--    <tr class="tr_header">-->
<!--        <td>1</td>-->
<!--        <td>天使八倍</td>-->
<!--        <td>5689天</td>-->
<!--    </tr>-->
<!--    <tr class="tr_header">-->
<!--        <td>1</td>-->
<!--        <td>天使八倍</td>-->
<!--        <td>5689天</td>-->
<!--    </tr>-->
<!--    <tr class="tr_header">-->
<!--        <td>1</td>-->
<!--        <td>天使八倍</td>-->
<!--        <td>5689天</td>-->
<!--    </tr>-->
    </tbody>

</table>
     <div id="pagination" class="pagination"></div>
    <script>
        var pageTotal = 0;   //总页数
        var pageSize = 9;    //一页显示几个
        window.onload = function () {

            InitAjax(1);
        }
        function onLoadPaging() {
            new myPagination({
                id: 'pagination',
                curPage: 1, //初始页码
                pageTotal: pageTotal, //总页数
                pageAmount: pageSize,  //每页多少条
                pageSize: 2, //可选,分页个数

                getPage: function (page) {
                    //获取当前页数
                    InitAjax(page)
                }
            })
        }


        function InitAjax(pageNum) {
            $.ajax({
                url: "/wechat/home/volunteer/statistics/list",
                type: 'post',
                dataType: 'json',
                data: {
                    pagination: "{page:\"" + pageNum + "\",rows:\""+pageSize+"\",sidx:\"volunteercoin\",sord:\"desc\"}"
                }, success: function (result) {
                    ajaxCallBack(result);
                }

            })
        }

        function ajaxCallBack(data) {
            var insetViewData = ""; //视图数据
            $.each(data.data.rows, function(index,items) {
                insetViewData+= "<tr class=\"tr_header\">\n"+
                    "                        <td>"+(index+1)+"</td>\n"+
                    "                        <td>"+items.joinname+"</td>\n" +
                    "                        <td>"+items.volunteercoin+"</td>\n" +
                    "                    </tr>";

            });
            $("#insetViewData").html(insetViewData);
            if(pageTotal==0){
                pageTotal=data.data.total;
                onLoadPaging()
            }
        }


    </script>
    <!--end 页码-->
</div>
</div>
</body>
</html>